
$(document).on("mouseenter",".item",function(){
	$(this).addClass("on");
});
$(document).on("mouseleave",".item",function(){
	$(this).removeClass("on");
});
	
$(document).ready(function (){
	var nScrollHight = 0; //滚动距离总长(注意不是滚动条的长度)
	var nScrollTop = 0;  //滚动到的当前位置
	var nDivHight = $(".box-scroll").height();
		 
	$(".box-scroll").scroll(function(){
	 nScrollHight = $(this)[0].scrollHeight;
	 nScrollTop = $(this)[0].scrollTop;
	 //if(nScrollTop + nDivHight >= nScrollHight)
				
	});
});

//显示隐藏
$(document).ready(function(){
    $('.cart-btn').hover(function() {
        $(".j-mini-cart").css('display', 'block');
    }, function() {
           $(".j-mini-cart").css('display', 'none');
    });
        $(".j-mini-cart").hover(function() {
    $(this).css('display', 'block');
    }, function() {
         $(this).css('display', 'none');
    });
 });
 
 
 function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
	  c_start = document.cookie.indexOf(c_name + "=")
	  if (c_start!=-1)
	  { 
	    c_start=c_start + c_name.length+1 
	    c_end=document.cookie.indexOf(";",c_start)
	    if (c_end==-1) c_end=document.cookie.length
	    	return unescape(document.cookie.substring(c_start,c_end))
	  } 
	}
	return "";
}